﻿//Модель
Ext.define('model.DayLog', {
    extend: 'Ext.data.Model',
    fields: [
       { name: 'iDay', type: 'int' },
       { name: 'DayStatistic.All' },
       { name: 'DayStatistic.Processed' },
       { name: 'DayStatistic.ProcessedErr' },
       { name: 'DayStatistic.NotProcessed' },
       { name: 'DayStatistic.DMetaStatistic.IsDownload' },
       { name: 'DayStatistic.DMetaStatistic.IsIndexed' },
       { name: 'DayStatistic.DMetaStatistic.dmAll' },
       { name: 'DayStatistic.DMetaStatistic.IsHaveKeyWords' }
    ],
    idProperty: 'iDay'
});

//Хранилище
Ext.define('store.DayLog', {
    extend: 'Ext.data.Store',
    model: 'model.DayLog',
    proxy: new Ext.data.HttpProxy({
        //url: '/AdministrationPort.ashx/GetDayLogs',
        headers: { 'Content-type': 'application/json' },
        reader: { root: 'd' },
        api: {            
                read: '/AdministrationPort.ashx/GetDayLogs',
                update: '/AdministrationPort.ashx/GetDayLogs'
                },
    })
});

